<?php $this->load->view('header/admin'); ?>
<div id="main">
    <div class="container">
        <div class="span-17 colborder" id="content">
        <?php if (isset($messages)) echo $messages; ?>
            <h3 class="caps">Gliders</h3>
	        <?php if ($gliders): ?>
	           <div class="span-16 last">
                    <div class="box span-5">
                        <p>Click on the name of the glider for more information</p>
                        <dl>
                        <?php foreach($gliders as $e): ?>
                            <dt class="caps prepend-top">
                                <?php if (!isset($e->brand)) echo '<h2>Undefined: '.$e->brand.'</h2>'?>
                                <?php echo anchor('admin/gliders/see/'.$e->id, GliderModel::getGliderBrand($e->brand).' - '.$e->model, 
                                    'class="glider-info'.(($selected == $e->id)? ' selected' : '').'" id="glider-'.$e->id.'"')?>&nbsp;
                            </dt>
                        <?php endforeach; ?>
                        </dl>
                    </div>
                    <div id="glider-details" class="box span-9 last" style="">
	                    <dl>
	                        <dt class="caps">Manufacturer: </dt> 
	                        <dd id="glider-name"><?php echo GliderModel::getGliderBrand($glider->brand); ?></dd>
                            <dt class="caps prepend-top">Model: </dt>
                            <dd id="glider-since"><?php echo $glider->model; ?></dd>
	                        <dt class="caps prepend-top">EN Cert.: </dt> 
	                        <dd id="glider-description"><?php echo $glider->cert_en; ?></dd>
	                        <dt class="caps prepend-top">LTF Cert.: </dt> 
	                        <dd id="glider-website"><?php echo $glider->cert_ltf; ?></dd>
	                        <dt class="caps prepend-top">Prototype? </dt> 
                            <dd id="glider-active"><?php echo ($glider->proto)? 'Yes':'No'; ?></dd>
                            <dd>
                                [ <?php echo anchor('admin/gliders/edit/'.$glider->id, 'Edit', 'class="glider-edit" id="glider-'.$glider->id.'"')?> |
                                  <?php echo anchor('admin/gliders/delete/'.$glider->id, 'Delete', 'class="glider-edit" id="glider-'.$glider->id.'"')?> ]
                            </dd>
	                    </dl>
                    </div>
                </div>
			<?php endif; ?>
			<div class="span-16">
	        <p><?php echo anchor('admin/gliders/add', 'Add Glider')?> | <?php echo anchor('admin', 'Admin')?></p>
	        </div>
        </div> <!-- end content -->
        <?php $this->load->view('menu/admin')?>
    </div> <!-- end container -->
    <script type="text/javascript">
    </script>
</div> <!-- end main -->
<?php $this->load->view('footer/standard');?>
